From: Florian Müllner Date: Thu, 22 May 2025 02:26:19 +0000 (+0200) Subject: dbusServices/extensions: Stop using an expander for error details X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~116^2^2~13 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=3b509b3d451bfb6a7aba680c68dab69675bfc1b6;p=gnome-shell.git dbusServices/extensions: Stop using an expander for error details Always show the error details up front instead of hiding them in an expander. Other then getting rid of custom widgetry, this solves the awkwardness of switching between very little content (which is best suited by a small window size) to very verbose content (which favors a tall window). Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8413 Part-of: --- diff --git a/js/dbusServices/extensions/css/application.css b/js/dbusServices/extensions/css/application.css index 133e858f5..e69de29bb 100644 --- a/js/dbusServices/extensions/css/application.css +++ b/js/dbusServices/extensions/css/application.css @@ -1,7 +0,0 @@ -.expander { padding: 12px; } -.expander.expanded { border: 0 solid @borders; border-bottom-width: 1px; } -.expander-toolbar { - border: 0 solid @borders; - border-top-width: 1px; - padding: 3px; -} diff --git a/js/dbusServices/extensions/extensionPrefsDialog.js b/js/dbusServices/extensions/extensionPrefsDialog.js index 9be0e6f4f..ab7e684d7 100644 --- a/js/dbusServices/extensions/extensionPrefsDialog.js +++ b/js/dbusServices/extensions/extensionPrefsDialog.js @@ -82,9 +82,6 @@ class ExtensionPrefsErrorPage extends Adw.PreferencesPage { static [Gtk.internalChildren] = [ 'descriptionLabel', - 'expander', - 'expanderArrow', - 'revealer', 'errorView', ]; @@ -124,26 +121,6 @@ class ExtensionPrefsErrorPage extends Adw.PreferencesPage { this._descriptionLabel.set({label}); - this._gesture = new Gtk.GestureClick({ - button: 0, - exclusive: true, - }); - this._expander.add_controller(this._gesture); - - this._gesture.connect('released', (gesture, nPress) => { - if (nPress === 1) - this._revealer.reveal_child = !this._revealer.reveal_child; - }); - - this._revealer.connect('notify::reveal-child', () => { - this._expanderArrow.icon_name = this._revealer.reveal_child - ? 'pan-down-symbolic' - : 'pan-end-symbolic'; - this._syncExpandedStyle(); - }); - this._revealer.connect('notify::child-revealed', - () => this._syncExpandedStyle()); - const formattedError = formatError(error); this._errorView.buffer.text = formattedError; @@ -158,13 +135,6 @@ class ExtensionPrefsErrorPage extends Adw.PreferencesPage { this._errorMarkdown = lines.join('\n'); } - _syncExpandedStyle() { - if (this._revealer.reveal_child) - this._expander.add_css_class('expanded'); - else if (!this._revealer.child_revealed) - this._expander.remove_css_class('expanded'); - } - _addCustomStylesheet() { let provider = new Gtk.CssProvider(); let uri = 'resource:///org/gnome/Shell/Extensions/css/application.css'; diff --git a/js/dbusServices/extensions/ui/extension-error-page.ui b/js/dbusServices/extensions/ui/extension-error-page.ui index 5af0d2d11..0f2bc275b 100644 --- a/js/dbusServices/extensions/ui/extension-error-page.ui +++ b/js/dbusServices/extensions/ui/extension-error-page.ui @@ -15,66 +15,29 @@ - - 12 + + Error Details + + + True + page.copy-error + False + edit-copy-symbolic + Copy Error + + - - True - vertical - - - 6 - - - - pan-end-symbolic - - - - - Technical Details - - - - - - - - - vertical - - - True - False - word - 12 - 12 - 12 - 12 - - - - - - - - True - page.copy-error - False - edit-copy-symbolic - Copy Error - - - - - - - - + + True + False + word + 12 + 12 + 12 + 12 +